package demo6;

import org.springframework.stereotype.Component;

@Component
public class Demo2 {
    public static void main(String[] args) {
      // Singleton s1 = new Singleton();
        // Singleton s2 = new Singleton();
        Singleton s1 = Singleton.getInstance();
        Singleton s2 = Singleton.getInstance();
        System.out.println(s1==s2);
        System.out.println(s1);
        System.out.println(s2);

        //Student student = new Student();


        Student instance = Student.getInstance();
        Student instance1 = Student.getInstance();
        System.out.println(instance);
        System.out.println(instance1);


    }
}
